﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using ELab.Client;
using ELab.Serialization.Data;
using ELab.Message;

namespace ELab.Teacher.Controls
{
    public partial class ctrlQAManagement : UserControl
    {
        public IEnumerable<User> Users { get; set; }
        public ELabClient TeacherControl { get; set; }
        public event EventHandler Cancel;
        
        public ctrlQAManagement()
        {
            InitializeComponent();
        }

        private void btnMakeQuestions_Click(object sender, EventArgs e)
        {
            ctrlCreationQuestion _createQuestion = new ctrlCreationQuestion();
            _createQuestion.Users = Users;
            _createQuestion.TeacherControl = TeacherControl;
            pnContent.Controls.Clear();
            pnContent.Controls.Add(_createQuestion);
        }

        private void btnMakeTestLesson_Click(object sender, EventArgs e)
        {
            ctrlMakeTestLesson _makeLesson = new ctrlMakeTestLesson();
            _makeLesson.Users = Users;
            _makeLesson.TeacherControl = TeacherControl;
            pnContent.Controls.Clear();
            pnContent.Controls.Add(_makeLesson);
        }

        private void btnMakeLessionTable_Click(object sender, EventArgs e)
        {
            ctrlQACreation _createQuestion = new ctrlQACreation();
            _createQuestion.Users = Users;
            _createQuestion.TeacherControl = TeacherControl;
            pnContent.Controls.Clear();
            pnContent.Controls.Add(_createQuestion);
        }

        public void RaiseCancel()
        {
            Cancel(this, null);
        }
    }
}
